package com.fyy;

import com.fyy.builder.Meal;
import com.fyy.builder.MealBuilder;

/**
 * @Author fyy
 * @Description
 * @Date 2020/7/23 14:54
 */
public class BuilderTest {

    public static void main(String[] args) {
        MealBuilder mealBuilder = new MealBuilder();

        Meal vegMeal = mealBuilder.prepareVegMeal();
        System.out.println("素食");
        vegMeal.showItems();
        System.out.println("总计 : " +vegMeal.getCost());

        Meal nonVegMeal = mealBuilder.prepareNonVegMeal();
        System.out.println("\n\n肉食");
        nonVegMeal.showItems();
        System.out.println("总计 : " +nonVegMeal.getCost());
    }

}
